<template>
  <el-form-item :label="label + '：'" :prop="name" :rules="[{ required, message: `请上传${label}` }]">
    <ImageEditor v-model="form[name]" :disabled="!editting" :size="size"></ImageEditor>
  </el-form-item>
</template>

<script>
import {defineAsyncComponent} from 'vue';
export default {
  components: {
    ImageEditor: defineAsyncComponent(() => import('./ImageEditor.vue'))
  },
  props: {
    form: null,
    name: null,
    required: { default: true },
    label: { default: '图片' },
    editting: { default: true },
    size: { default: 40 }
  }
};
</script>

<style lang='less' scoped>
</style>
